/* USER CODE BEGIN Header */
/**
 ******************************************************************************
 * @file           :
 * @brief          :
 ******************************************************************************
 * @attention
 *
 ******************************************************************************
 */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __API_H
#define __API_H

#ifdef __cplusplus
extern "C"
{
#endif

/* Includes ------------------------------------------------------------------*/

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "stdint.h"
#include "stdbool.h"
/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
/* USER CODE BEGIN EFP */
bool Call_MotorPower_Set(char enable);
char Call_MotorPower_Get(void);
bool Call_MotorMode_Set(char mode);
char Call_MotorMode_Get(void);
bool Call_MotorIQ_Set(float set);
bool Call_MotorVelocity_Set(float set);
bool Call_MotorPosition_Set(float set);
float Call_MotorIQ_Get(void);
float Call_MotorVelocity_Get(void);
float Call_MotorPosition_Get(void);
//pid
bool Call_PIDCurrentKp_Set(float kp);
bool Call_PIDCurrentKi_Set(float ki);
bool Call_PIDCurrentUpper_Set(float ki);
bool Call_PIDCurrentLower_Set(float ki);
bool Call_PIDVelocityKp_Set(float ki);
bool Call_PIDVelocityKi_Set(float ki);
bool Call_PIDVelocityUpper_Set(float ki);
bool Call_PIDVelocityLower_Set(float ki);
bool Call_PIDPositionKp_Set(float ki);
bool Call_PIDPositionKi_Set(float ki);
bool Call_PIDPositionKd_Set(float ki);
bool Call_PIDPositionUpper_Set(float ki);
bool Call_PIDPositionLower_Set(float ki);
float Call_PIDCurrentKp_Get(void);
float Call_PIDCurrentKi_Get(void);
float Call_PIDCurrentUpper_Get(void);
float Call_PIDCurrentLower_Get(void);
float Call_PIDVelocityKp_Get(void);
float Call_PIDVelocityKi_Get(void);
float Call_PIDVelocityUpper_Get(void);
float Call_PIDVelocityLower_Get(void);
float Call_PIDPositionKp_Get(void);
float Call_PIDPositionKi_Get(void);
float Call_PIDPositionKd_Get(void);
float Call_PIDPositionUpper_Get(void);
float Call_PIDPositionLower_Get(void);
//input limit
bool Call_CurrentInputLimit_Set(float limit);
float Call_CurrentInputLimit_Get(void);
bool Call_VelocityInputLimit_Set(float limit);
float Call_VelocityInputLimit_Get(void);
bool Call_PositionInputUpper_Set(float upper);
float Call_PositionInputUpper_Get(void);
bool Call_PositionInputLower_Set(float lower);
float Call_PositionInputLower_Get(void);
// trapezoid
float Call_TPosVMAX_Get(void);
float Call_TPosAcc_Get(void);
float Call_TPosDec_Get(void);
void Call_TPosVMAX_Set(float set);
void Call_TPosAcc_Set(float set);
void Call_TPosDec_Set(float set);
float Call_TVelVMAX_Get(void);
float Call_TVelAcc_Get(void);
float Call_TVelDec_Get(void);
void Call_TVelVMAX_Set(float set);
void Call_TVelAcc_Set(float set);
void Call_TVelDec_Set(float set);
//brake control
void Call_BrakeLevel_Set(uint8_t level);
uint8_t Call_BrakeLevel_Read(void);
char Call_BrakeEnable_Set(char enable);

bool Call_UserParametersSave(void);
/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif
